<template>
  <div class="app-container">
    <bdTable :tableHeader="tableHeader" :tableData="tableData" class="mb-10" />
  </div>
</template>
<script>
import { queryWzSqInfo } from '@/api/home'
export default {
  name: '',
  data () {
    return {
      searchParams: {
        name: null
      },
      tableHeader: {
        type: 'index',
        label: '序号',
        header: [
          {
            prop: 'name',
            label: '社区名称',
            minWidth: 200,
            overflowTooltip: true
          },
          {
            prop: 'post1',
            label: '政策知晓',
            filter: (row) => {
              return row.post1 ?? 0
            }
          },
          {
            prop: 'post9',
            label: '乡镇（街道）',
            filter: (row) => {
              return row.post9 ?? 0
            }
          },
          {
            prop: 'post10',
            label: '机关活动',
            filter: (row) => {
              return row.post10 ?? 0
            }
          },
          {
            prop: 'post20',
            label: '两组织新活动',
            filter: (row) => {
              return row.post20 ?? 0
            }
          },
          {
            prop: 'post21',
            label: '共筑共建',
            filter: (row) => {
              return row.post21 ?? 0
            }
          },
          {
            prop: 'post6',
            label: '村集体经济',
            filter: (row) => {
              return row.post6 ?? 0
            }
          },
          {
            prop: 'post5',
            label: '组织生活',
            filter: (row) => {
              return row.post5 ?? 0
            }
          },
          {
            prop: 'post4',
            label: '主题教育',
            filter: (row) => {
              return row.post4 ?? 0
            }
          }
        ]
      },
      // 列表数据
      tableData: []
    }
  },
  mounted () {
    this.searchWzSqInfo()
  },
  methods: {
    async searchWzSqInfo () {
      const data = await queryWzSqInfo()
      this.tableData = data
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
